<div class="ticket-tt" id="ticket-tt" data-type="1">
    <div class="ticket-tt-t">
        <div class="ticket-l">推荐票</div>
        <a href="/user/helpDetail?id=10613" class="ticket-r">
            ?
        </a>
    </div>
    <div class="ticket-val">
        <h4 class="ticket-l">
            <i class="icon-ticket-male"></i>男生推荐票
        </h4>
        <strong class="ticket-r"><output class="ticket-output" id="nan">0</output></strong>
    </div>
    <div class="ticket-val">
        <h4 class="ticket-l">
            <i class="icon-ticket-female"></i>女生推荐票
        </h4>
        <strong class="ticket-r"><output class="ticket-output" id="nv">0</output></strong>
    </div>
</div>
<h4 class="ticket-rt">投推荐票记录<span class="char-dot">&nbsp;·&nbsp;</span>显示近30天</h4>
<div class="module module-merge" id="recordWrapper">
    <ol class="record-ol record-ol-ticket" id="ticketRecordOl">
    </ol>
</div>
<script type="text/template" class="hide1" id="tpl">
    <li class="record-li-ticket" data-rid="{{rid}}" data-index="{{index}}">
        <div class="record-li-left">
            <span>投推荐票</span>
            <span>{{startTime}}</span>
        </div>
        <div class="record-li-right">
            <span>{{bName}}</span>
            <span>{{recomm}}票</span>
        </div>
    </li>
</script>
<script>
    _$(function(){
        _$.post('/getuserHeadimg',function(data){
            if(data['code']==1) {
                var userinfo = data['info']['userinfo'];
                var username = data['info']['username'];
                _$("#nan").html(userinfo['recomm']['nan']);
                _$("#nv").html(userinfo['recomm']['nv']);
            }
        })
    })
    _$.post('/getRecommList',function(data){
        console.log(data);
        if(data.code==1){
            var monthArr=data.info.monthArr;
            var bookArr=data.info.bookArr;
            if(monthArr.length>0){
                var html="";
                for(var val in monthArr){
                    monthArr[val]['startTime']=getTimes(monthArr[val]['startTime']);
                    monthArr[val]['index']=parseInt(val)+1;
                    monthArr[val]['bName']=bookArr[val]['bName'];
                    html += template('tpl', monthArr[val]);
                }
                _$("#ticketRecordOl").append(html);
            }else{
                _$("#ticketRecordOl").html('<div class="null-x"><div class="null">近期暂无投票记录</div></div>');
            }
        }
    })
</script>